package com.cims.common.utility;

import java.net.HttpURLConnection;
import java.net.URL;

public class NetUtils {
	public static boolean existsURL(String URLName) {
		try {
			URL u = new URL(URLName);
			HttpURLConnection con = (HttpURLConnection) u.openConnection();
			con.setRequestMethod("HEAD");
			System.out.println(con.getResponseCode() + " : " + con.getResponseMessage());
			return (con.getResponseCode() == HttpURLConnection.HTTP_OK);
		} catch (Exception e) {
			e.printStackTrace();
			return false;
		}
	}
}
